﻿using System;
using FBGraph.Models;

namespace FBGraph.Controllers
{
    public partial class NotesController : IFBGraphPrimaryController<Note>
    {
        /// <summary>Posts a note on the specified profile.</summary>
        /// <param name="profileId">The profile on which the note will be posted.</param>
        /// <param name="subject">The subject for the note.</param>
        /// <param name="message">The body of the note.</param>
        /// <returns>The Graph API identifier for the note that was posted.</returns>
        public Object Create(Object profileId, String subject, String message)
        {
            var args = new FBArgs
            {
                { "subject", subject },
                { "message", message }
            };

            var result = Context.Post(profileId, "notes", args);

            return result.Id;
        }
    }
}